import { DataTypeHint } from '@/core/sql/dataType';

/**
 * https://mariadb.com/kb/en/data-types/
 */
export const MariaDBTypes: DataTypeHint[] = [
  { name: 'BIGINT', primitiveType: 'long' },
  { name: 'BINARY', primitiveType: 'string' },
  { name: 'BIT', primitiveType: 'int' },
  { name: 'BLOB', primitiveType: 'lob' },
  { name: 'BOOL', primitiveType: 'boolean' },
  { name: 'BOOLEAN', primitiveType: 'boolean' },
  { name: 'CHAR', primitiveType: 'string' },
  { name: 'DATE', primitiveType: 'date' },
  { name: 'DATETIME', primitiveType: 'dateTime' },
  { name: 'DEC', primitiveType: 'decimal' },
  { name: 'DECIMAL', primitiveType: 'decimal' },
  { name: 'DOUBLE PRECISION', primitiveType: 'double' },
  { name: 'DOUBLE', primitiveType: 'double' },
  { name: 'ENUM', primitiveType: 'string' },
  { name: 'FIXED', primitiveType: 'decimal' },
  { name: 'FLOAT', primitiveType: 'float' },
  { name: 'GEOMETRY', primitiveType: 'string' },
  { name: 'GEOMETRYCOLLECTION', primitiveType: 'string' },
  { name: 'INT', primitiveType: 'int' },
  { name: 'INTEGER', primitiveType: 'int' },
  { name: 'JSON', primitiveType: 'lob' },
  { name: 'LINESTRING', primitiveType: 'string' },
  { name: 'LONGBLOB', primitiveType: 'lob' },
  { name: 'LONGTEXT', primitiveType: 'lob' },
  { name: 'MEDIUMBLOB', primitiveType: 'lob' },
  { name: 'MEDIUMINT', primitiveType: 'int' },
  { name: 'MEDIUMTEXT', primitiveType: 'lob' },
  { name: 'MULTILINESTRING', primitiveType: 'string' },
  { name: 'MULTIPOINT', primitiveType: 'string' },
  { name: 'MULTIPOLYGON', primitiveType: 'string' },
  { name: 'NUMERIC', primitiveType: 'decimal' },
  { name: 'POINT', primitiveType: 'string' },
  { name: 'POLYGON', primitiveType: 'string' },
  { name: 'REAL', primitiveType: 'double' },
  { name: 'SET', primitiveType: 'string' },
  { name: 'SMALLINT', primitiveType: 'int' },
  { name: 'TEXT', primitiveType: 'lob' },
  { name: 'TIME', primitiveType: 'time' },
  { name: 'TIMESTAMP', primitiveType: 'dateTime' },
  { name: 'TINYBLOB', primitiveType: 'lob' },
  { name: 'TINYINT', primitiveType: 'int' },
  { name: 'TINYTEXT', primitiveType: 'lob' },
  { name: 'VARBINARY', primitiveType: 'string' },
  { name: 'VARCHAR', primitiveType: 'string' },
  { name: 'YEAR', primitiveType: 'int' },
];
